<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>iframe_removal</title>

<style type="text/css">
div#tall_building		{width:8px; height:1600px; background:#999;}
iframe#id_sub_frame			{position:fixed; top:160px; left:80px;}
iframe#id_cross_domain_frame		{position:fixed; top:300px; left:400px;}

</style>


<script type="text/javascript">

function CloseFrame() {

	var objIfm	= document.getElementById('id_sub_frame');

	if (objIfm) {
		alert('found sub iframe');
		objIfm.parentNode.removeChild(objIfm);
	}
}

function ReFresh() {

	var url		= window.location.href;
	var pos		= url.indexOf('#');

	if (pos != -1) {
		url	= url.substring(0, pos);
	}

	pos		= url.indexOf('?');

	if (pos != -1) {
		url	= url.substring(0, pos);
	}


	window.location	= url;

}


</script>

</head>

<body>

<h1>ParentWindow</h1>


<script type="text/javascript">
document.write(new Date().toString());
</script>

<a href="javascript:ReFresh()">Refresh</a>

<iframe id="id_sub_frame" name="local_iframe" src="sub_iframe.html" border="1"></iframe>

<iframe id="id_cross_domain_frame" name="cross_domain_iframe" src="http://dev.sofav.com/js/test/cross_domain_iframe.html" border="1"></iframe>

<div id="tall_building"></div>

</body>
</html>